package com.feng.chat.pojo;

import io.gitee.zerowsh.actable.annotation.AcColumn;
import io.gitee.zerowsh.actable.annotation.AcTable;
import io.gitee.zerowsh.actable.emnus.ColumnTypeEnums;

import java.time.LocalTime;

@AcTable(name = "split_upload",comment = "文件拆分上传")
public class SplitUpload {
    @AcColumn(name = "id",comment = "临时文件ID",type = ColumnTypeEnums.INT,length = 20,isAutoIncrement = true,isKey = true)
    private Integer id;

    @AcColumn(name = "type",defaultValue = "2",comment = "数据类型[1:合并文件;2:拆分文件]",type = ColumnTypeEnums.TINYINT)
    private Integer type;

    @AcColumn(name = "drive",defaultValue = "1",comment = "文件驱动[1:local;2:cos;]",type = ColumnTypeEnums.INT)
    private Integer drive;

    @AcColumn(name = "user_id",defaultValue = "0",comment = "上传的用户ID",type = ColumnTypeEnums.INT)
    private Integer user_id;

    @AcColumn(name = "upload_id",defaultValue = "0",comment = "上传文件ID",type = ColumnTypeEnums.INT,length=20)
    private Integer upload_id;

    @AcColumn(name = "original_name",defaultValue = "",comment = "原文件名",type = ColumnTypeEnums.VARCHAR,length=100)
    private String original_name;

    @AcColumn(name = "split_index",defaultValue = "0",comment = "当前索引块",type = ColumnTypeEnums.TINYINT)
    private Integer split_index;

    @AcColumn(name = "split_num",defaultValue = "0",comment = "总上传索引块",type = ColumnTypeEnums.TINYINT)
    private Integer split_num;

    @AcColumn(name = "path",defaultValue = "",comment = "保存路径",type = ColumnTypeEnums.VARCHAR,length=255)
    private String path;

    @AcColumn(name = "file_ext",defaultValue = "",comment = "文件后缀名",type = ColumnTypeEnums.VARCHAR,length=10)
    private String file_ext;

    @AcColumn(name = "file_size",defaultValue = "0",comment = "临时文件大小",type = ColumnTypeEnums.BIGINT)
    private Integer file_size;

    @AcColumn(name = "is_delete",defaultValue = "0",comment = "文件是否已被删除[0:否;1:是]",type = ColumnTypeEnums.TINYINT)
    private Integer is_delete;

    @AcColumn(name = "attr",defaultValue = "0",comment = "额外参数",type = ColumnTypeEnums.VARCHAR)
    private String attr;

    @AcColumn(name = "created_at", comment = "创建时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime createdAt;

    @AcColumn(name = "updated_at", comment = "更新时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime updatedAt;
}
